<?php echo $html->script(array('jquery', 'dynamicform/jquery-ui-1.8.2.custom.min', 'dynamicform/jquery-dynamic-form')); ?>
<script type="text/javascript">
	$(document).ready(function(){
		var mainDynamicForm = $("#pointfield").dynamicForm("#plus", "#minus", {
			 
			formPrefix:"mainForm",
			afterClone:function(clone){
				if(window.console && window.console.log){
					console.log("I'm a clone", clone);
				}
			},
			createColor:"green"
		});
		$("#pfdetailtemplate").dynamicForm("#plus2", "#minus2", {limit:5,
			createColor:"red"});
	});
</script>

<div class="content-box">
	<div class="box-body">
	<div class="box-header clear">
	<ul class="tabs clear">
		<li><button type="button" class="button black" id = "addField">Thêm</button></li>
	</ul>
	
	<h2>Điểm rèn luyện</h2>
	</div>
	
	<div class="box-wrap clear">
	
	<div id="table">
	<form method="POST" action="add">
	<div id="pointform" class="bt-space20">
		<div id="pointfield" class="pointfield bt-space10">
			<div class="form-field clear col2-3">
				<div class="form-field clear">
				<label for="textfield" class="form-label size-120 fl-space2">Tên cột: <span class="required">*</span></label>
				<input type="text" id="pfname" name="pfname" class="required text fl-space2" size="80"/>
				</div>
				<div class="form-field clear">
				<label for="textfield" class="form-label size-120 fl-space2">Chi tiết: <span class="required">*</span></label>
				<ul id="pfdetail">
					<li id="pfdetailtemplate" class="bt-space10">
						<input id="pfdesc" type="text" name="description" size="30"/>
						Số điểm
						<input id="pfval" type="text" name="value" size="10"/>
						<span style="clear:none; float:right;"><a id="minus2" href="">[-]</a> <a id="plus2" href="">[+]</a></span></p>
					</li>
				</ul>
				</div>
			</div>
			<!--  <span style="clear:none; float:right;"><a id="minus" href="">[-]</a><a id="plus" href="">[+]</a></span></p>-->
		</div>
		<div class="col2-3 bt-space20"><a id="minus" href="">[-]</a><a id="plus" href="">[+]</a></div>
	</div>
	<div class="col2-3">
		<button type="submit" class="button red">Hoàn tất</button>
	</div>
	</form>
	<div class="tab-footer clear">
	
	
	
	</div>
	
	</div>
	<!-- /#table --></div>
	<!-- end of box-wrap --></div>
</div>
<!-- end of content-box -->